﻿<UserControl x:Class="HRM.CustomControl.PagingControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             x:Name="uc">
    <UserControl.Resources>
        <Style TargetType="TextBox">
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="VerticalAlignment" Value="Stretch" />
            <Setter Property="MinWidth" Value="26" />
            <Setter Property="Text" Value="0" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <StackPanel Height="24" Orientation="Horizontal">
            <Button Content="&lt;&lt;" Click="Button_Click"></Button>
            <Button Content="&lt;" Click="Button_Click_1"/>
            <TextBox Text="{Binding PageIndex, ElementName=uc, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
                
            </TextBox>
            <TextBlock VerticalAlignment="Center" Text="of" Margin="10, 0"/>
            <TextBox Text="{Binding NumberOfPages, ElementName=uc}" IsReadOnly="True"/>
            <Button Content="&gt;" Click="Button_Click_2"/>
            <Button Content="&gt;&gt;" Click="Button_Click_3"/>
            <TextBlock VerticalAlignment="Center" Text="PageSize: " Margin="20,0,5,0"/>
            <TextBox Text="{Binding PageSize, ElementName=uc}"/>
        </StackPanel>
    </Grid>
</UserControl>
